<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <script src="vue.js"></script>
    <title>Title</title>
</head>
<body>
<div id="box">
    <input type="text" @keyup.13="show($event)" value="13">
    <input type="text" @keyup.enter="show($event)" value="enter" @keyup.up="showup" @keyup.down="showdown" @keyup.left="showleft" @keyup.right="showright">
</div>
</body>
<script>
    var app = new Vue({
        el: '#box',
        data: {},
        methods: {
            show: function (ev) {
                alert('按了回车');
            },
            show2: function () {
                alert(2);
            },
            showup: function () {
                console.log('up');
            },
            showdown: function () {
                console.log('down');
            },
            showleft: function () {
                console.log('left');
            },
            showright: function () {
                console.log('right');
            },
        }
    })
</script>
</html>